\begin{figure}[H]
\begin{center}
\begin{tikzpicture}
[scale=0.65, nodes={scale=0.65, minimum size=26},
redcell/.style={draw=red!50,fill=red!50},
lbluecell/.style={draw=blue!10,fill=blue!10},
greencell/.style={draw=green!50,fill=green!50},
]
{
\node(0) at (0,-1.2) [lbluecell] {\textbf{0}};
\node(1) at (1,-1.2) [lbluecell] {\textbf{1}};
\node(2) at (2,-1.2) [lbluecell] {\textbf{2}};
\node(3) at (3,-1.2) [lbluecell] {\textbf{3}};
\node(4) at (4,-1.2) [lbluecell] {\textbf{4}};
\node(5) at (5,-1.2) [lbluecell] {\textbf{5}};
\node(6) at (6,-1.2) [lbluecell] {\textbf{6}};
\node(7) at (7,-1.2) [lbluecell] {\textbf{7}};
\node(8) at (8,-1.2) [lbluecell] {\textbf{8}};
\node(9) at (9,-1.2) [lbluecell] {\textbf{9}};
\node(10) at (10,-1.2) [lbluecell] {\textbf{10}};
\node(11) at (11,-1.2) [lbluecell] {\textbf{11}};
\node(12) at (12,-1.2) [lbluecell] {\textbf{12}};
\node(13) at (13,-1.2) [lbluecell] {\textbf{13}};
\node(14) at (14,-1.2) [lbluecell] {\textbf{14}};
\node(15) at (15,-1.2) [lbluecell] {\textbf{15}};
\node(16) at (16,-1.2) [lbluecell] {\textbf{16}};
\node(17) at (17,-1.2) [lbluecell] {\textbf{17}};
\node(18) at (18,-1.2) [lbluecell] {\textbf{18}};
\draw[rounded corners, style=densely dotted] (-0.6,-0.6) rectangle (20.6,-1.8);
\node at (19.5,-1.2) {\textit{index}};
\node(19) at (0,-2.5) [redcell] {12};
\node(20) at (1,-2.5) [redcell] {7};
\node(21) at (2,-2.5) [redcell] {13};
\node(22) at (3,-2.5) [redcell] {9};
\node(23) at (4,-2.5) [redcell] {5};
\node(24) at (5,-2.5) [redcell] {17};
\node(25) at (6,-2.5) [redcell] {10};
\node(26) at (7,-2.5) [redcell] {3};
\node(27) at (8,-2.5) [redcell] {15};
\node(28) at (9,-2.5) [redcell] {1};
\node(29) at (10,-2.5) [redcell] {0};
\node(30) at (11,-2.5) [redcell] {11};
\node(31) at (12,-2.5) [redcell] {8};
\node(32) at (13,-2.5) [redcell] {4};
\node(33) at (14,-2.5) [redcell] {16};
\node(34) at (15,-2.5) [redcell] {2};
\node(35) at (16,-2.5) [redcell] {14};
\node(36) at (17,-2.5) [redcell] {6};
\node(37) at (18,-2.5) [redcell] {18};
\draw[rounded corners, style=densely dotted] (-0.6,-1.9) rectangle (20.6,-3.1);
\node at (19.5,-2.5) {\textit{suftab}};
\node(38) at (0,-3.8) [greencell] {10};
\node(39) at (1,-3.8) [greencell] {9};
\node(40) at (2,-3.8) [greencell] {15};
\node(41) at (3,-3.8) [greencell] {7};
\node(42) at (4,-3.8) [greencell] {13};
\node(43) at (5,-3.8) [greencell] {4};
\node(44) at (6,-3.8) [greencell] {17};
\node(45) at (7,-3.8) [greencell] {1};
\node(46) at (8,-3.8) [greencell] {12};
\node(47) at (9,-3.8) [greencell] {3};
\node(48) at (10,-3.8) [greencell] {6};
\node(49) at (11,-3.8) [greencell] {11};
\node(50) at (12,-3.8) [greencell] {0};
\node(51) at (13,-3.8) [greencell] {2};
\node(52) at (14,-3.8) [greencell] {16};
\node(53) at (15,-3.8) [greencell] {8};
\node(54) at (16,-3.8) [greencell] {14};
\node(55) at (17,-3.8) [greencell] {5};
\node(56) at (18,-3.8) [greencell] {18};
\draw[rounded corners, style=densely dotted] (-0.6,-3.2) rectangle (20.6,-4.4);
\node at (19.5,-3.8) {\textit{saftab$^{-1}$}};
};
\end{tikzpicture}
\end{center}
\caption{The suffix table and the inverse suffix table for $S$.}
\label{fig:isuftab}
\end{figure}
